package cn.com.thingo.shyintelligent.ui.activity;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.OnClick;
import cn.com.thingo.shyintelligent.R;
import cn.com.thingo.shyintelligent.base.BaseActivity;
import cn.com.thingo.shyintelligent.base.contract.EzWifiResetContract;
import cn.com.thingo.shyintelligent.presenter.EzWifiResetPresenter;


public class EzWifiResetActivity extends BaseActivity<EzWifiResetPresenter> implements EzWifiResetContract.View , View.OnClickListener {
    @BindView(R.id.btnNext)
    View btnNext;
    @BindView(R.id.topTip)
     TextView topTip;
    @BindView(R.id.toolbar_left)
    ImageView ivLeft;
    @BindView(R.id.toolbar_title)
    TextView tvTitle;
    @Override
    protected void initInject() {
getActivityComponent().inject(this);
    }

    @Override
    protected int getLayout() {
        return R.layout.activity_ezwifi_reset;
    }

    @Override
    protected void initEventAndData()   {
        initTitleBar();
        initUI();
    }
    private  void  initTitleBar(){
        ivLeft.setImageResource(R.mipmap.back);
        tvTitle.setText(R.string.device_reset_title);
    }
    private void initUI(){
        topTip.setText(R.string.device_reset_tip);
        btnNext.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch (v.getId()) {
            case R.id.btnNext:
                intent = new Intent(this, EzWifiNetConfigActivity.class);
                intent.putExtras(getIntent());
                startActivity(intent);
                break;
            default:
                break;
        }
    }


    @OnClick({R.id.toolbar_left})
    public void onViewClick(View view) {
        switch (view.getId()) {
            case R.id.toolbar_left:
                finish();
                break;
        }
    }
}
